template<typename T>
class TTreeListItem : public TList<T, TTreeListItem<T> >
{
    typedef TList<T, TTreeListItem<T> > Base;
public:
       typedef TTreeListItem<T> Item;
       typedef List<T, Item> Children;

        inline TTreeListItem(T curr) : Base(), mCurr(curr)
	{}

	inline ref<Item>& Next(void)
	{
		return mNext;
	}

	inline T& Current(void)
	{
		return mCurr;
	}

        inline Children GetChildren(void)
	{
                return Children(this);
	}
protected:
        T mCurr;
        ref<Item> mNext;
};
